<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
</head>
<body >
        <div style="height: 50vh;width: 100%;border: 1px solid #ccc"></div>
        <div style="height: 50vh;width: 100%;border: 1px solid #ccc"></div>
        <div style="height: 50vh;width: 100%;border: 1px solid #ccc"></div>
</body>
</html>
<script type="text/javascript">
    window.addEventListener('scroll', function () {
       if(window.pageYOffset + window.innerHeight >= document.documentElement.scrollHeight){
            alert("xx")
       }
    })
</script>